function isNumber(value){
    return typeof value === 'number' && !Number.isNaN(value)
}

console.log(isNumber(1));
console.log(isNumber(Infinity));

